#! /usr/bin/python

import math

const = 30.403243784
print math.floor(2**const)/10**9

u1 = math.floor(2**(const - 1))/10**9
print u1
for i in range(2, 10000):
    u1 = math.floor(2**(const-u1**2))/10**9
    #print u1, i

def f(x):
  return int(2**(30.403243784 - x*x)) * 1e-9
 
def u(n):
  if n==0: return -1
  return f( u(n-1) )
 
i = 0
while abs(u(i) - u(i+2)) > 1e-10:
  i += 51
 
print "Answer to PE197", u(i) + u(i+1)
